/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pruebas;

/**
 *
 * @author OROZCO7
 */
public class Contenedor {

    private int x = 100;
   static String bar="variable";
    void metodo() {
        ClaseEstatica ref = new ClaseEstatica();
        ref.mostrar();
            System.out.println("metodo(): z = "+ref.z);
            System.out.println("metodo: y = "+ref.y);
    }

    static class ClaseEstatica {

        int y = 30;
        int z = 20;

        void mostrar() {
        
            Contenedor conten = new Contenedor();
            System.out.println("mostrar(): x =  "+conten.x);
            System.out.println("mostrar(): bar ="+bar);
        }
    }
}
     class StaticNestedClassDemo {

     public static void main(String args[]) {

    Contenedor con = new Contenedor();
con.metodo();
con.getClass();

     }

     }

